package com.zhao;

import com.zhao.concreteObserver.User;
import com.zhao.concreteSubject.Subscription;

public class Client {
    public static void main(String[] args) {
        Subscription subscription = new Subscription();

        User zhangsan = new User("张三");
        User lisi = new User("李四");
        User wagnwu = new User("王五");

        subscription.attach(zhangsan);
        subscription.attach(lisi);
        subscription.attach(wagnwu);


        subscription.notifyAllObserver("超市大减价！！！");
    }
}
